/**
* 基金-提交成功弹窗组件，
*    import FundCommitModal from 'components/modal/fund/FundCommitModal'
*    'fund-commit-modal':FundCommitModal
* 例子使用：this.$store.dispatch('setModal',{visible:true,entrustBs:2,ofname:'基金名称',entrustAmt:'1000',modalId:Constant.modal.FUND_COMMIT_MODAL});
* entrustBs: 提交类型  2:认购  3:申购  4:赎回  Number
* fundName: 基金名称  String
* entrustAmt: 数量   认购和申购传发生金额，赎回传发生份额
*/
<template>
  <transition name="slide-fade">
    <div  class="modal" v-if="modal.visible && modal.modalId=='fundCommitModal'" id="fundCommitModal" tabindex="-1" @click.stop.prevent="modalHide">
      <div class="modal-dialog" @click.stop.prevent>
        <div class="modal-content fund-modal" >
          <img src="~assets/images/tankuang-m@2x.png" class="img-responsive">
          <img src="~assets/images/close@2x.png" data-dismiss="modal" class="img-close" @click.stop.prevent="modalHide">
          <div class="title">提交成功！</div>
          <div class="wrapper">
            <p>您{{modal.entrustBs==2?'认购':(modal.entrustBs==3?'申购':'赎回')}}的{{modal.ofname}}，{{modal.entrustAmt}}{{modal.entrustBs==4?'份额':'元'}}委托单已提交成功</p>
            <p>当前您看到的基金净值并不一定是实际成交净值，请悉知。</p>
            <button type="button" class="btn btn-lg" @click.stop.prevent="confirmQuery">确认并查看委托</button>
          </div>
        </div>
      </div>
    </div>
  </transition>
</template>

<script>
  import BaseModal from 'components/modal/BaseModal'

  export default {
    data () {
      return {}
    },
    extends:BaseModal,
    methods:{
      confirmQuery(){
        this.modalHide();
        this.$router.push({path:'/fundentrust'})
      }
    }
  }
</script>

<style scoped>
  .slide-fade-enter-active,.slide-fade-leave-active{
    transition: all 0.3s ease;
  }
  .slide-fade-enter, .slide-fade-leave-active {
    transform: translate(0,-25%);
    opacity: 0;
  }
  .modal-content.fund-modal .title{
    top: 7%;
    font-size: 20px;
  }
  .modal-content.fund-modal p:nth-child(2){
    color: #7a7a7a;
  }
</style>
